﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BomberManServer.Utils;

namespace BomberManServer.Gaming.Object.Stats
{
    public class PlayerStats
    {
        //webService
        public UInt32 uid { get; private set; }

        public UInt16 teamID { get; private set; }

        public UInt16 nbKill { get; private set; }
        public UInt16 nbDeath { get; private set; }
        public UInt16 nbSuicide { get; private set; }
        public bool surrender { get; private set; }

        public PlayerStats(UInt32 playerID, UInt16 teamID)
        {
            this.uid = playerID;
            this.nbKill = 0;
            this.nbSuicide = 0;
            this.nbDeath = 0;
            this.teamID = teamID;
        }

        //return true if the kill end the round
        public void addKill()
        {
            this.nbKill++;
        }
        public void addDeath()
        {
            this.nbDeath++;
        }
        public void addSuicide()
        {
            this.nbSuicide++;
            this.nbDeath++;
        }
        public Int16 getScore()
        {
            return (Int16)(this.nbKill - this.nbSuicide);
        }

        
    }
}
